<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script src="./Promise.js"></script>
    <script>
      let p = new MyPromise((resolve, reject) => {
          resolve("成功");
      });
      let p11 = p.then(value=>{
        console.log(value);
        return new MyPromise((resolve,reject)=>{
          reject('dk')
        })
      })
      console.log(p11);
      // let p1 = new MyPromise((resolve, reject) => {
      //     resolve("成功");
      // });
      // let p2 = new MyPromise((resolve, reject) => {
      //   resolve("失败");
      // });
      // let promises = [p,p1,3]
      // MyPromise.allSettled(promises).then(res=>{
      //   console.log(res);
      // })      
    </script>
  </body>
</html>
